module.exports = (plop) => {
  plop.setGenerator('components', {
    description: 'creat a component',
    prompts: [
      {
        type: 'input',
        name: 'name',
        message: 'component name',
        default: 'MyComponent',
      },
    ],
    actions: [
      {
        type: 'add',
        path: 'src/components/{{name}}/{{name}}.js',
        templateFile: 'plop-templates/components.hbs',
      },
    ],
  });
};
